﻿# coding: utf-8

import wx
import wx.lib.scrolledpanel as scrolled

class wxPanelPropertyBuildSingle(scrolled.ScrolledPanel):
    def __init__(self, parent, id):
        """ Default class constructor """
        
        scrolled.ScrolledPanel.__init__(self, parent, id)
        
        self._cbRotation = wx.CheckBox(self, -1, TD.PROPERTY_ROTATION_RANGE)
        self._cbScaling = wx.CheckBox(self, -1, TD.PROPERTY_SCALING_RANGE)
        self._cbUniformScaling = wx.CheckBox(self, -1, TD.PROPERTY_UNIFORM_SCALING)
                
        self.Bind(wx.EVT_CHECKBOX, self.__OnCbChange, self._cbRotation)
        self.Bind(wx.EVT_CHECKBOX, self.__OnCbChange, self._cbScaling)
        
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self._cbRotation, 0, wx.LEFT)
        sizer.Add(self._cbScaling, 0, wx.LEFT)
        self.SetSizer(sizer)
        
    def __OnCbChange(self, e):
        cb = e.GetEventObject()
        if e.IsChecked():
            print 'fsdfs'
        else:
            print 'dd'